package com.yunyi.model.worker.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName WorkOrderInfo
 * @Description 订单信息
 * @Author leizhang
 * Date 2021/8/22 12:44 上午
 * @Version 1.0
 **/
public class WorkOrderInfo {
    /**
     * id
     **/
    private int id;
    /**
     * 员工姓名
     **/
    private String workerName;
    /**
     * 工作班次类型
     **/
    private int workType;
    /**
     * 订单编号
     **/
    private String orderCode;
    /**
     * 工作时间
     **/
    private String workTime;
    /**
     * 班次名称
     **/
    private String name;
    /**
     * 员工id
     **/
    private int workerId;
    /**
     * 班次id
     **/
    private int timeShiftId;
    /**
     * 员工app_id
     **/
    private String appId;
    /**
     * 签到时间
     **/
    private Date signInTime;
    private Date offWorkTime;
    private String showTime;
    /**
     * 工作开始时间
     **/
    private String beginTime;
    /**
     * 工作状态
     **/
    private int workStatus;

    /**
     * 排队人数
     **/
    private int queueNumber;
    private String titleName;

    private int threshold;

    public int getThreshold() {
        return threshold;
    }

    public void setThreshold(int threshold) {
        this.threshold = threshold;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getWorkerName() {
        return workerName;
    }

    public void setWorkerName(String workerName) {
        this.workerName = workerName;
    }

    public int getWorkType() {
        return workType;
    }

    public void setWorkType(int workType) {
        this.workType = workType;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public String getWorkTime() {
        return workTime;
    }

    public void setWorkTime(String workTime) {
        this.workTime = workTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWorkerId() {
        return workerId;
    }

    public void setWorkerId(int workerId) {
        this.workerId = workerId;
    }

    public int getTimeShiftId() {
        return timeShiftId;
    }

    public void setTimeShiftId(int timeShiftId) {
        this.timeShiftId = timeShiftId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Date getSignInTime() {
        return signInTime;
    }

    public void setSignInTime(Date signInTime) {
        this.signInTime = signInTime;
    }

    public String getTitleName() {
        return this.workTime.concat("  ").concat(this.name);
    }

    public void setTitleName(String titleName) {
        this.titleName = titleName;
    }

    public String getShowTime() {
        if (1 == this.workStatus) {
            return this.workTime.concat("  ").concat(this.beginTime).concat(" 之前");
        } else if (3 == this.workStatus) {
            return new SimpleDateFormat("yyyy-MM-dd").format(new Date()).concat(" 22:00:00");
        } else if (2 == this.workStatus) {
            return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(signInTime);
        } else if (6 == this.workStatus) {
            if (null != offWorkTime) {
                return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(offWorkTime);
            }else {
                return "--";
            }
        } else {
            return "--";
        }
    }

    public Date getOffWorkTime() {
        return offWorkTime;
    }

    public void setOffWorkTime(Date offWorkTime) {
        this.offWorkTime = offWorkTime;
    }

    public void setShowTime(String showTime) {
        this.showTime = showTime;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public int getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(int workStatus) {
        this.workStatus = workStatus;
    }

    public int getQueueNumber() {
        return queueNumber;
    }

    public void setQueueNumber(int queueNumber) {
        this.queueNumber = queueNumber;
    }
}
